package Administrator.Login.AdministratorLoginController;

import java.awt.event.*;
import Administrator.Login.AdministratorLoginView.*;
import Administrator.Login.AdministratorLoginModel.*;

import javax.swing.JOptionPane;

public class ExitButtonListener implements ActionListener
{
	public ExitButtonListener(AdministratorLoginView view, AdministratorLoginModel model)
	{
	    this.view = view;
	    this.model = model;
	}
    public void actionPerformed(ActionEvent event)
    {
       int choice = JOptionPane.showConfirmDialog(this.view.frame, "Do you want to exit?");
       if (choice == JOptionPane.YES_OPTION)
       {
    	   System.exit(0);
       }
    }
    
    private AdministratorLoginView view;
    private AdministratorLoginModel model;
}
